<?php
require_once './src/autoload.php'; 

use Knp\Snappy\Pdf; 

// Initialize the library with the
// path to the wkhtmltopdf binary:
$snappy = new Pdf('/usr/local/bin/wkhtmltopdf'); 

// Display the resulting pdf in the browser
// by setting the Content-type header to pdf: 

header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="file.pdf"'); 

echo $snappy->getOutput('http://www.github.com');